package com.tianji.learning.controller;


import com.tianji.learning.domain.vo.SignResultVO;
import com.tianji.learning.service.ISignRecordService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

@Controller
@RequestMapping("/sign-records")
@Api(tags = "签到记录表接口")
@RequiredArgsConstructor
public class SignRecordController {

    private final ISignRecordService signRecordService;


    @ApiOperation("签到功能接口")
    @PostMapping
    public SignResultVO addSignRecord() {
        return signRecordService.addSignRecord();
    }

    @ApiOperation("查询签到记录")
    @GetMapping
    @ResponseBody/*把返回的数据格式化成json格式返回给前端*/
    public Byte[] querySignRecords(){
        return signRecordService.querySignRecords();
    }


}
